package com.peration.cropdiagnosis;

import android.app.ProgressDialog;
import android.content.Context;

public class MyProgressDialog extends ProgressDialog {

	public MyProgressDialog(Context context, String message) {
		super(context);
		setCancelable(true);
		setMessage(message);
		setProgressStyle(ProgressDialog.STYLE_SPINNER);
	}

	public MyProgressDialog(Context context, String message, int max) {
		this(context, message);
		setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
		setProgress(0);
		setMax(max);
	}

	public MyProgressDialog showIt() {
		this.show();
		return this;
	}

}
